/*
 * Hex.java
 *
 * Created on November 18, 2007, 12:43 PM
 *
 * Copyright (C) 2007-2008  Hylke van der Schaaf
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, in version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package hextd.hex;

import hextd.tower.Tower;
import java.awt.Graphics2D;
import java.util.ArrayList;

/**
 *
 * @author hylke
 */
public interface Hex {

	public static enum HexType {

		base,
		baseTransparent,
		empty,
		path
	}

	public static enum neighbours {

		right, left, rightUp, leftUp, rightDown, leftDown;
	}

	public static enum highlightType {

		none,
		selectTower,
		placeTower,
		editHex;
	}

	public HexType getType();

	public char getShortName();

	public void initNeighbours();

	public void resetScale();

	public void paintBase(Graphics2D g2_0, Graphics2D g2_1);

	public void paintEffects(Graphics2D g2);

	/* The editor sometimes needs to move hexes */
	public void setLocation(int x, int y);

	/**
	 * return location as int[] = {col,row}
	 * @return {col,row}
	 */
	public int[] getLocation();

	public int getCol();

	public int getRow();

	public float[] getFloatLocation();

	public float[] getPaintLocation();

	public void setHighlight(highlightType hightlight);

	public void setHighlightRange(float range);

	public void addClaim(int player, int level);

	public void addClaim(int player, int level, int radius);

	public boolean isBuildable(int player);

	public boolean hasTower();

	public void setTower(Tower tower);

	public void unSetTower();

	public Tower getTower();

	public void neighbours(int radius, ArrayList<Hex> collection);
}
